Git新手入门

Categories: Development Notes; Tagged with: ; @ December 11th, 2012 0:27

1. 创建Repository

git init

2. Commit文件

git add .
git commit –m “init Import”

3. 查看状态

git status

4.增加本地Repo到服务器

git remote add origin https://github.com/.....git

5Commit 到服务器

git push origin master

6. 从gitHub复制Repository

git clone git://…git

7. 从服务器更新:

git pull origin master

当一个Repo在GitHub上创建完毕后会有简要提示:

Create a new repository on the command line

touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/DavidGuoliang/DoubanAnalytics.git git push -u origin master

Push an existing repository from the command line

git remote add origin https://github.com/DavidGuoliang/DoubanAnalytics.git git push -u origin master

GitHub有提供Windows下的UI图形界面.

Links: http://gitref.org/creating/

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.